﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterPage/Site.Master" AutoEventWireup="true" CodeBehind="Roles.aspx.cs" Inherits="new_Seminario.ABM.Roles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Roles</h2>
 <div class="contTabla">
         <asp:GridView ID="gvRoles" runat="server" AutoGenerateColumns="False" 
             CellPadding="4" ForeColor="#333333" GridLines="None" AllowSorting="True" 
             DataKeyNames="Id_Rol" DataSourceID="RolesGrilla" AllowPaging="True" 
             onrowdeleted="gvRoles_RowDeleted" onrowdeleting="gvRoles_RowDeleting" 
             onrowupdating="gvRoles_RowUpdating">
             <AlternatingRowStyle BackColor="White" />
             <Columns>
                 <asp:BoundField DataField="Id_Rol" HeaderText="Id_Rol" 
                     SortExpression="Id_Rol" InsertVisible="False" ReadOnly="True" />
                 <asp:BoundField DataField="Descripcion" HeaderText="Descripcion" 
                     SortExpression="Descripcion" />
             </Columns>
             <EditRowStyle BackColor="#2461BF" />
             <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
             <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
             <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
             <RowStyle BackColor="#EFF3FB" />
             <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
             <SortedAscendingCellStyle BackColor="#F5F7FB" />
             <SortedAscendingHeaderStyle BackColor="#6D95E1" />
             <SortedDescendingCellStyle BackColor="#E9EBEF" />
             <SortedDescendingHeaderStyle BackColor="#4870BE" />
         </asp:GridView>
         <asp:SqlDataSource ID="RolesGrilla" runat="server" 
             ConnectionString="<%$ ConnectionStrings:BarCafe %>" 
             DeleteCommand="DELETE FROM [Rol] WHERE [Id_Rol] = @Id_Rol" 
             InsertCommand="INSERT INTO [Rol] ([Descripcion]) VALUES (@Descripcion)" 
             ProviderName="<%$ ConnectionStrings:BarCafe.ProviderName %>" 
             SelectCommand="SELECT * FROM [Rol]" 
             
             
             UpdateCommand="UPDATE [Rol] SET [Descripcion] = @Descripcion WHERE [Id_Rol] = @Id_Rol">
             <DeleteParameters>
                 <asp:Parameter Name="Id_Rol" Type="Int32" />
             </DeleteParameters>
             <InsertParameters>
                 <asp:Parameter Name="Descripcion" Type="String" />
             </InsertParameters>
             <UpdateParameters>
                 <asp:Parameter Name="Descripcion" Type="String" />
                 <asp:Parameter Name="Id_Rol" Type="Int32" />
             </UpdateParameters>
         </asp:SqlDataSource>
     </div>


    <div class="contTabla">
        <table>
        <tr>
            <td class="style1">
                <asp:Label ID="Label1" runat="server" Text="Ingrese el Rol:"></asp:Label>
            </td>
            <td class="style1">
               <asp:TextBox ID="txbRol" runat="server" MaxLength="25" ></asp:TextBox>
            </td>
        </tr>
        </table>
         <br />
         <br />
        <asp:Button ID="btnAceptaComandar" runat="server" Text="Aceptar" 
            onclick="btnAceptaComandar_Click"/>
        <asp:Button ID="btnCancelarComanda" runat="server" Text="Cancelar" 
            onclick="btnCancelarComanda_Click" />
    
    </div>
</asp:Content>
